﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Net;
using MS.Core.Constants.Objects;
using System.Collections.Specialized;
using LHS.Core.TableInfo;
using System.Collections;
using LHS.Win.SetUpCaseRecordForm.Forms;
using LHS.Core.CaseRecord.Classes;

namespace LHS.Win
{
    public partial class frmMain : Form
    {
        // Methods
        LHS.Core.Clinical.ClinicalController objController = new LHS.Core.Clinical.ClinicalController();
        public frmMain()
        {
            this.InitializeComponent();
        }

        private void ctmCuoiThang_Click(object sender, EventArgs e)
        {
            this.mnuMedicine_Click(sender, e);
        }

        private void ctmTheoBacSi_Click(object sender, EventArgs e)
        {
            this.mnuBS_Click(sender, e);
        }

        private void ducLinhXPToolBar1_ButtonClick(object sender, ToolBarButtonClickEventArgs e)
        {
            switch (this.ducLinhXPToolBar1.Buttons.IndexOf(e.Button))
            {
                case 0:
                    this.mnuLapBenhAnMoi_Click(sender, e);
                    break;

                case 1:
                    this.mnuTimHSBenhAn_Click(sender, e);
                    break;
                case 2:
                    this.mnuSearchID_Click(sender, e);
                    break;
                case 4:
                    this.mnuContent_Click(sender, e);
                    break;
            }
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            this.ducLinhXPMenu1.AddPicture(this.mnuContent, 0x1f);
            this.ducLinhXPMenu1.AddPicture(this.mnuDangNhap, 2);
            this.ducLinhXPMenu1.AddPicture(this.mnuThayDoi, 3);
            this.ducLinhXPMenu1.AddPicture(this.mnuDoiMatKhau, 4);
            this.ducLinhXPMenu1.AddPicture(this.mnuThoát, 1);
            this.ducLinhXPMenu1.AddPicture(this.mnuDSXN, 0x20);
            this.ducLinhXPMenu1.AddPicture(this.mnuLoiKhuyenThuPhauThuat, 0x19);
            this.ducLinhXPMenu1.AddPicture(this.mnuThemNguoiTruyNhap, 6);
            this.ducLinhXPMenu1.AddPicture(this.mnuCapNhatQuyen, 5);
            this.ducLinhXPMenu1.AddPicture(this.mnuXoaBenhAn, 0x18);
            this.ducLinhXPMenu1.AddPicture(this.mnuTrace, 0x1d);
            this.ducLinhXPMenu1.AddPicture(this.mnuHuyHD, 0x1c);
            this.ducLinhXPMenu1.AddPicture(this.mnuThemNhanVien, 14);
            this.ducLinhXPMenu1.AddPicture(this.mnuCapNhatNhanVien, 12);
            this.ducLinhXPMenu1.AddPicture(this.mnuBS, 0x13);
            this.ducLinhXPMenu1.AddPicture(this.mnuTrieuChungChanDoanNoiSoi, 0x17);
            this.ducLinhXPMenu1.AddPicture(this.mnuNhapThuoc, 0x21);
            this.ducLinhXPMenu1.AddPicture(this.mnuMedicine, 13);
            this.ducLinhXPMenu1.AddPicture(this.mnuLapBenhAnMoi, 0x10);
            this.ducLinhXPMenu1.AddPicture(this.mnuTimHSBenhAn, 0x11);
            this.ducLinhXPMenu1.AddPicture(this.ctmTheoBacSi, 15);
            this.ducLinhXPMenu1.AddPicture(this.ctmTheoLoaiBenh, 8);
            this.ducLinhXPMenu1.AddPicture(this.ctmCuoiThang, 13);
            this.ducLinhXPMenu1.AddPicture(this.mnuSearchID, 34); //edit here --> thêm phần search cho mã vạch
            this.ducLinhXPMenu1.Start(this);
            this.fDangNhap = new frmDangNhap(this);
            this.fDangNhap.ShowInTaskbar = false;
            this.fDangNhap.ShowDialog(this);
        }

        private void menuItem6_Click(object sender, EventArgs e)
        {
            if ((this.fToaThuocMau == null) || (this.fToaThuocMau.flag == 0))
            {
                this.fToaThuocMau = new frmToaThuocMau();
                this.fToaThuocMau.MdiParent = this;
                this.fToaThuocMau.Show();
            }
            else
            {
                this.fToaThuocMau.Activate();
            }
        }

        private void mnuAbout_Click(object sender, EventArgs e)
        {
            if (this.fAds == null)
            {
                this.fAds = new frmAds();
                this.fAds.Show();
            }
            if (this.fAds.flag == 0)
            {
                this.fAds = new frmAds();
                this.fAds.Show();
            }
            if (this.fAds.flag == 1)
            {
                this.fAds.Activate();
            }
        }

        private void mnuBackup_Click(object sender, EventArgs e)
        {
            int num = 0;
            DataSet ds = objController.LoadFromSql("sp_helpserver", null, CommandType.StoredProcedure);

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                if (ds.Tables[0].Rows[0]["name"].ToString().ToUpper() == SystemInformation.ComputerName.ToString().ToUpper())
                {
                    num = 1;
                    break;
                }
            }

            if (num == 0)
            {
                MessageBox.Show("Chỉ có server mới sử dụng được chức năng này", "Information");
            }
            else if (this.fBackupSchedule == null)
            {
                this.fBackupSchedule = new frmBackupSchedule();
                this.fBackupSchedule.MdiParent = this;
                this.fBackupSchedule.Show();
            }
            else
            {
                this.fBackupSchedule.Activate();
            }
        }

        private void mnuBS_Click(object sender, EventArgs e)
        {
            if (this.fBaoCaoCuoiNgay == null)
            {
                this.fBaoCaoCuoiNgay = new frmBaoCaoCuoiNgay();
                this.fBaoCaoCuoiNgay.MdiParent = this;
                this.fBaoCaoCuoiNgay.Show();
            }
            if (this.fBaoCaoCuoiNgay.flag == 0)
            {
                this.fBaoCaoCuoiNgay = new frmBaoCaoCuoiNgay();
                this.fBaoCaoCuoiNgay.MdiParent = this;
                this.fBaoCaoCuoiNgay.Show();
            }
            if (this.fBaoCaoCuoiNgay.flag == 1)
            {
                this.fBaoCaoCuoiNgay.Activate();
            }
        }

        private void mnuCapNhatNhanVien_Click(object sender, EventArgs e)
        {
            if (this.fCapNhatNhanVien == null || this.fCapNhatNhanVien.flag == 0)
            {
                this.fCapNhatNhanVien = new frmCapNhatNhanVien();
                this.fCapNhatNhanVien.MdiParent = this;
                this.fCapNhatNhanVien.Show();
            }
            if (this.fCapNhatNhanVien.flag == 1)
            {
                this.fCapNhatNhanVien.Activate();
            }
        }

        private void mnuCapNhatQuyen_Click(object sender, EventArgs e)
        {
            if (this.fCapNhatQuyen == null)
            {
                this.fCapNhatQuyen = new frmCapNhatQuyen();
                this.fCapNhatQuyen.MdiParent = this;
                this.fCapNhatQuyen.Show();
            }
            if (this.fCapNhatQuyen.flag == 0)
            {
                this.fCapNhatQuyen = new frmCapNhatQuyen();
                this.fCapNhatQuyen.MdiParent = this;
                this.fCapNhatQuyen.Show();
            }
            if (this.fCapNhatQuyen.flag == 1)
            {
                this.fCapNhatQuyen.Activate();
            }
        }

        private void mnuContent_Click(object sender, EventArgs e)
        {
            Process.Start(Application.StartupPath + "/PMHelp.chm");
        }

        private void mnuDangNhap_Click(object sender, EventArgs e)
        {
            this.frmMain_Load(sender, e);
        }

        private void mnuDoiMatKhau_Click(object sender, EventArgs e)
        {
            if (this.fDoiMatKhau == null)
            {
                this.fDoiMatKhau = new frmDoiMatKhau();
                this.fDoiMatKhau.MdiParent = this;
                this.fDoiMatKhau.Show();
            }
            if (this.fDoiMatKhau.flag == 0)
            {
                this.fDoiMatKhau = new frmDoiMatKhau();
                this.fDoiMatKhau.MdiParent = this;
                this.fDoiMatKhau.Show();
            }
            if (this.fDoiMatKhau.flag == 1)
            {
                this.fDoiMatKhau.Activate();
            }
        }

        private void mnuDSThuoc_Click(object sender, EventArgs e)
        {
            if ((this.fStock == null) || (this.fStock.flag == 0))
            {
                ArrayList arrColumn = new ArrayList();
                arrColumn.Add(InfoMedicineImport.MIMID);
                DataTable dt = objController.GetData("vw_MedicineStock", true, 1, false, arrColumn, null, null);
                if (dt == null || dt.Rows.Count == 0)
                {
                    MessageBox.Show("Kho thuốc rỗng", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                this.fStock = new frmUsedMedicine();
                this.fStock.MdiParent = this;
                this.fStock.Show();
            }
            if (this.fStock.flag == 1)
            {
                this.fStock.Activate();
            }
        }

        private void mnuDSXN_Click(object sender, EventArgs e)
        {
            if ((this.fXetNghiem == null) || (this.fXetNghiem.flag == 0))
            {
                this.fXetNghiem = new frmXetNghiem();
                this.fXetNghiem.MdiParent = this;
                this.fXetNghiem.Show();
            }
        }

        private void mnuHoaDon_Click(object sender, EventArgs e)
        {
            if ((this.fBenhAnChuaTinhTien == null) || (this.fBenhAnChuaTinhTien.flag == 0))
            {
                if (UserInformation.blnExistPatient == false)
                {
                    ArrayList arrColumn = new ArrayList();
                    arrColumn.Add(InfoPatients.PATISN);
                    DataTable dt = objController.GetData(InfoPatients.TABLENAME, true, 1, false, arrColumn, null, null);
                    if (dt == null || dt.Rows.Count == 0)
                    {
                        MessageBox.Show("Hiện chưa bệnh án nào tồn tại!", "Không tìm thấy bệnh án", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        return;
                    }
                    UserInformation.blnExistPatient = true;
                }

                this.fBenhAnChuaTinhTien = new frmBenhAnChuaTinhTien();
                this.fBenhAnChuaTinhTien.MdiParent = this;
                this.fBenhAnChuaTinhTien.Show();
            }
            if (this.fBenhAnChuaTinhTien.flag == 1)
            {
                this.fBenhAnChuaTinhTien.Activate();
            }
        }

        private void mnuHuyHoaDon_Click(object sender, EventArgs e)
        {
            if (this.fXoaHD == null)
            {
                ArrayList arrColumn = new ArrayList();
                arrColumn.Add(InfoPatients.PATISN);
                DataTable dtPatient = objController.GetData(InfoPatients.TABLENAME, true, 1, false, arrColumn, null, null);
                if (dtPatient == null || dtPatient.Rows.Count == 0)
                {
                    MessageBox.Show("Hiện chưa bệnh án nào tồn tại!", "Không tìm thấy bệnh án", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                dtPatient = objController.GetData("vw_FullPayment", true, 1, false, arrColumn, null, null);

                if (dtPatient == null || dtPatient.Rows.Count == 0)
                {
                    MessageBox.Show("Chưa có hóa đơn nào được thanh toán đầy đủ!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                this.fXoaHD = new frmXoaHD();
                this.fXoaHD.MdiParent = this;
                this.fXoaHD.Show();
            }
            if (this.fXoaHD.flag == 0)
            {
                ArrayList arrColumn = new ArrayList();
                arrColumn.Add(InfoPatients.PATISN);
                DataTable dtPatient = objController.GetData("vw_FullPayment", true, 1, false, arrColumn, null, null);
                if (dtPatient == null || dtPatient.Rows.Count == 0)
                {
                    MessageBox.Show("Chưa có hóa đơn nào được thanh toán đầy đủ!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                this.fXoaHD = new frmXoaHD();
                this.fXoaHD.MdiParent = this;
                this.fXoaHD.Show();
            }
            if (this.fXoaHD.flag == 1)
            {
                this.fXoaHD.Activate();
            }
        }

        private void mnuLapBenhAnMoi_Click(object sender, EventArgs e)
        {
            if (UserInformation.usrRole == "1") //neu user login la admin hoac bac sy khac voi yta
            {
                if ((this.fLapHoSoBenhAn == null) || (this.fLapHoSoBenhAn.flag == 0))
                {
                    this.fLapHoSoBenhAn = new frmLapHoSoBenhAn();
                    this.fLapHoSoBenhAn.MdiParent = this;
                    this.fLapHoSoBenhAn.Show();
                }
                if (this.fLapHoSoBenhAn.flag == 1)
                {
                    this.fLapHoSoBenhAn.Activate();
                }
            }
            else //neu user login la y ta, khac admin hoac bac si
            {
                if ((this.fLapHSBenhAnYTa == null) || (this.fLapHSBenhAnYTa.flag == 0))
                {
                    this.fLapHSBenhAnYTa = new frmLapHSBenhAnYTa();
                    this.fLapHSBenhAnYTa.MdiParent = this;
                    this.fLapHSBenhAnYTa.Show();
                }
                if (this.fLapHSBenhAnYTa.flag == 1)
                {
                    this.fLapHSBenhAnYTa.Activate();
                }
            }
        }

        private void mnuLapToaThuoc_Click(object sender, EventArgs e)
        {
            if (UserInformation.usrRole == "3")
            {
                if ((this.fNotToa == null) || (this.fNotToa.flag == 0))
                {
                    ArrayList arrColumn = new ArrayList();
                    arrColumn.Add(InfoClinicalRecord.CLRISN);
                    DataTable dt = objController.GetData("vw_PatientHasPrescription", true, 1, false, arrColumn, null, null);

                    if (dt == null || dt.Rows.Count == 0)
                    {
                        MessageBox.Show("Tất cả các toa đã được cấp!", "Không tìm thấy bệnh nhân chưa cấp toa thuốc", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        return;
                    }
                    this.fNotToa = new frmBANotCapThuoc();
                    this.fNotToa.MdiParent = this;
                    this.fNotToa.Show();

                }
                if (this.fNotToa.flag == 1)
                {
                    this.fNotToa.Activate();
                }
            }
            else
            {
                if ((this.fToaThuoc == null) || (this.fToaThuoc.flag == 0))
                {
                    ArrayList arrColumn = new ArrayList();
                    arrColumn.Add(InfoPatients.PATISN);
                    DataTable dt = objController.GetData("vw_SetUpPrescription", true, 1, false, arrColumn, null, null);

                    if (dt == null || dt.Rows.Count == 0)
                    {
                        MessageBox.Show("Hiện tại chưa có bệnh nhân nào chưa có toa thuốc!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                        return;
                    }
                    this.fToaThuoc = new frmNotToaThuoc();
                    this.fToaThuoc.MdiParent = this;
                    this.fToaThuoc.Show();
                }
                if (this.fToaThuoc.flag == 1)
                {
                    this.fToaThuoc.Activate();
                }
            }
        }

        private void mnuLoiKhuyenThuPhauThuat_Click(object sender, EventArgs e)
        {
            if ((this.fTienIch == null) || (this.fTienIch.flag == 0))
            {
                this.fTienIch = new frmTienIch();
                this.fTienIch.MdiParent = this;
                this.fTienIch.Show();
            }
            else
            {
                this.fTienIch.Activate();
            }
        }

        private void mnuMedicine_Click(object sender, EventArgs e)
        {
            if ((this.fSick == null) || (this.fSick.flag == 0))
            {
                this.fSick = new frmSickList();
                this.fSick.MdiParent = this;
                this.fSick.Show();
            }
            if (this.fSick.flag == 1)
            {
                this.fSick.Activate();
            }
        }

        private void mnuNhapThuoc_Click(object sender, EventArgs e)
        {
            if ((this.fEnterStock == null) || (this.fEnterStock.flag == 0))
            {
                this.fEnterStock = new frmEnterStock();
                this.fEnterStock.MdiParent = this;
                this.fEnterStock.Show();
            }
            if (this.fEnterStock.flag == 1)
            {
                this.fEnterStock.Activate();
            }
        }

        private void mnuRestore_Click(object sender, EventArgs e)
        {
            if (this.fRestore == null)
            {
                this.fRestore = new frmRestore();
                this.fRestore.MdiParent = this;
                this.fRestore.Show();
            }
            else
            {
                this.fRestore.Activate();
            }
        }

        private void mnuThayDoi_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < base.MdiChildren.Length; i = 0)
            {
                base.MdiChildren[i].Close();
            }
            this.frmMain_Load(sender, e);
        }

        private void mnuThemNguoiTruyNhap_Click(object sender, EventArgs e)
        {
            if (this.fThemNguoiTruyNhap == null)
            {
                this.fThemNguoiTruyNhap = new frmThemNguoiTruyNhap();
                this.fThemNguoiTruyNhap.MdiParent = this;
                this.fThemNguoiTruyNhap.Show();
            }
            if (this.fThemNguoiTruyNhap.flag == 0)
            {
                this.fThemNguoiTruyNhap = new frmThemNguoiTruyNhap();
                this.fThemNguoiTruyNhap.MdiParent = this;
                this.fThemNguoiTruyNhap.Show();
            }
            if (this.fThemNguoiTruyNhap.flag == 1)
            {
                this.fThemNguoiTruyNhap.Activate();
            }
        }

        private void mnuThemNhanVien_Click(object sender, EventArgs e)
        {
            if (this.fThemNhanVien == null)
            {
                this.fThemNhanVien = new frmThemNhanVien();
                this.fThemNhanVien.MdiParent = this;
                this.fThemNhanVien.Show();
            }
            if (this.fThemNhanVien.flag == 0)
            {
                this.fThemNhanVien = new frmThemNhanVien();
                this.fThemNhanVien.MdiParent = this;
                this.fThemNhanVien.Show();
            }
            if (this.fThemNhanVien.flag == 1)
            {
                this.fThemNhanVien.Activate();
            }
        }

        private void mnuThoát_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void mnuTimHSBenhAn_Click(object sender, EventArgs e)
        {
            if (UserInformation.usrRole != "3")
            {
                if ((this.fTimHoSoBenhAn == null) || (this.fTimHoSoBenhAn.flag == 0))
                {
                    this.fTimHoSoBenhAn = new frmTimHoSoBenhAn();
                    this.fTimHoSoBenhAn.MdiParent = this;
                    this.fTimHoSoBenhAn.Show();
                }
                if (this.fTimHoSoBenhAn.flag == 1)
                {
                    this.fTimHoSoBenhAn.Activate();
                }
            }
        }

        private void mnuTrace_Click(object sender, EventArgs e)
        {
            if (this.fTrace == null || this.fTrace.flag == 0)
            {
                ArrayList arrColumn = new ArrayList();
                arrColumn.Add(InfoInvoices.INVISN);
                DataTable dtInvoice = objController.GetData("vw_UpdateInvoiceHistory", true, 1, false, arrColumn, null, null);
                if (dtInvoice == null || dtInvoice.Rows.Count == 0)
                {
                    List<ExpressionObject> param = new List<ExpressionObject>();
                    param.Add(new ExpressionObject(InfoUserUpdatedInvoices.USNSTATUS, 0));
                    dtInvoice = objController.GetData("vw_UpdateInvoiceHistory", true, 1, false, arrColumn, param, null);
                    if (dtInvoice == null || dtInvoice.Rows.Count == 0)
                    {
                        dtInvoice = objController.GetData("vw_UserDeleteInvoice", true, 1, false, arrColumn, null, null);

                        if (dtInvoice == null || dtInvoice.Rows.Count == 0)
                        {
                            MessageBox.Show("Chưa có người nào cập nhật hóa đơn!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                            return;
                        }
                    }
                }
                this.fTrace = new frmTraceUpdateBill();
                this.fTrace.MdiParent = this;
                this.fTrace.Show();
            }
            if (this.fTrace.flag == 1)
            {
                this.fTrace.Activate();
            }
        }

        private void mnuTrieuChungChanDoanNoiSoi_Click(object sender, EventArgs e)
        {
            if ((this.fDiagnoseSyptom == null) || (this.fDiagnoseSyptom.flag == 0))
            {
                this.fDiagnoseSyptom = new frmDiagnoseSyptom();
                this.fDiagnoseSyptom.MdiParent = this;
                this.fDiagnoseSyptom.Show();
            }
            else
            {
                this.fDiagnoseSyptom.Activate();
            }
        }

        private void mnuXoaBenhAn_Click(object sender, EventArgs e)
        {
            if (this.fXoaBA == null || this.fXoaBA.flag == 0)
            {
                ListDictionary orderby = new ListDictionary();
                orderby.Add(InfoPatients.PATISN, "asc");

                DataTable dt = objController.GetData("vw_ClinicalRecord_Thao", true, 1, false, null, null, orderby);

                if (dt == null || dt.Rows.Count == 0)
                {
                    MessageBox.Show("Hiện tại chưa có bệnh án", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                this.fXoaBA = new frmXoaBenhAnh();
                this.fXoaBA.MdiParent = this;
                this.fXoaBA.Show();
            }
            if (this.fXoaBA.flag == 1)
            {
                this.fXoaBA.Activate();
            }
        }

        private bool validProduct()
        {
            string str = new ModifyRegistry().Read("PM");
            string s = Dns.GetHostEntry(Dns.GetHostName()).AddressList[0].ToString();
            string str4 = CryptoLib.DES.Encrypt(s).ToString();
            return (str == str4);
        }

        private void mnuXayDungBieuMau_Click(object sender, EventArgs e)
        {
            frmXayDungBieuMau _frmXayDungBieuMau = new frmXayDungBieuMau();
            _frmXayDungBieuMau.MdiParent = this;
            _frmXayDungBieuMau.Show();
            mnuXayDungBieuMau.Enabled = false;
        }

        private void mnuSearchID_Click(object sender, EventArgs e)
        {
            if (this.fSearchID == null || this.fSearchID.flag == 0)
            {
                this.fSearchID = new frmSearchID();
                this.fSearchID.MdiParent = this;
                this.fSearchID.Show();
            }
            if (this.fSearchID.flag == 1)
            {
                this.fSearchID.Activate();
            }
        }

        private void mnuBaoCao_ThongKePhauThuat_Click(object sender, EventArgs e)
        {
            frmBieuMau_1 _frmBieuMau = new frmBieuMau_1(this, "-1", "-1", "-1", "-1", "-1", clsEnumType.DisplayMode.STATISTICAL);
            _frmBieuMau.MdiParent = this;
            _frmBieuMau.Show();
            mnuBaoCao_ThongKePhauThuat.Enabled = false;
        }

        #region Xay dung bieu mau cho tien can

        /// <summary>
        /// Edit by thaoht 20091216
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mnuXayDungBieuMau4TienCan_Click(object sender, EventArgs e)
        {
            LHS.Win.SetUpTienCanForm.Forms.frmXayDungBieuMau _frmXayDungBieuMau = new LHS.Win.SetUpTienCanForm.Forms.frmXayDungBieuMau();
            _frmXayDungBieuMau.MdiParent = this;
            _frmXayDungBieuMau.Show();
            menuSetUpTienCan.Enabled = false;
        }


        private void mnuBaoCao_ThongKeTienCan_Click(object sender, EventArgs e)
        {
            //category_ID = -9999 : tien can
            LHS.Win.SetUpTienCanForm.Forms.frmBieuMau_1 _frmBieuMau = new LHS.Win.SetUpTienCanForm.Forms.frmBieuMau_1(this, "-9999", "-1", "-1", "-1", "-1", clsEnumType.DisplayMode.STATISTICAL);
            _frmBieuMau.MdiParent = this;
            _frmBieuMau.Show();
            menuThongKeTienCan.Enabled = false;
        }
        #endregion
    }
}